import java.util.Random;
public class work4 {
	public static void main(String[] args) {
		int [] [] arr = {{1,2},{3,4,5,6},{7,8,9,10}};
		Random ra = new Random();
		for(int i = arr.length-1;i>0;i--) {
				int j = ra.nextInt(i+1);
				int [] tmp;
				tmp = arr[j];
				arr[j] = arr[i];
				arr[i] = tmp;
			
			}
		for(int i=0;i<arr.length;i++) {
			for(int j=0;j<arr[i].length;j++) {
				System.out.print(arr[i][j]+" ");
			}
			System.out.println();
		}
		
		}
	}

